﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL;

namespace BLL
{
    public class Comment
    {
        public int U_id { get; set; }
            public int C_id { get; set; }
            public int M_id { get; set; }
            public string Name { get; set; }
            public DateTime Time { get; set; }
            public string Details { get; set; }
            //创建构造函数
            public Comment(string name, string details):this()
            {

                Name = name;
                Details = details;
            }
            public Comment() { }
            public void IsGetShortComment()
            {
                CommentData sc = new CommentData();
                sc.GetShortComment(U_id, M_id, Name, Time, Details);
            }

            public void IsGetLongComment()
            {
                CommentData lc = new CommentData();
                lc.GetLongComment(U_id, M_id, Name, Time, Details);
            }
            public void IsGetMovieComment()
            {
                CommentData c = new CommentData();
                c.GetMovieComment(U_id, C_id, Name, Time, Details);
            }
            public void MovieDel(int id)
            {
                CommentData cmm = new CommentData();
                cmm.MovieDel(id);

            }
            public void CinemaDel(int id)
            {
                CommentData cmm = new CommentData();
                cmm.CinemaDel(id);
            }

        public void CommentsOfMovies(int u_id)
        {
            U_id = u_id;
        }
        //主页评论显示函数
            public IQueryable <CommentsOfMovies> showC()
            {
                //声明数据层CommentData的对象
                CommentData cd=new CommentData();
                return  cd.SC();
            }
    }
}